package com.zhongen.wflow.workflow.config;

import com.zhongen.wflow.workflow.bean.process.OrgUser;

import java.util.regex.Pattern;

/**
 * @author : willian fu
 * @date : 2022/9/4
 */
public class WflowGlobalVarDef {

	// 审批自动驳回
	public static final String WFLOW_TASK_REFUSE = "WFLOW_TASK_REFUSE";

	// 审批自动通过
	public static final String WFLOW_TASK_AGRRE = "WFLOW_TASK_AGRRE";

	// 流程Node节点变量KEY
	public static final String WFLOW_NODE_PROPS = "WFLOW_NODE_PROPS";

	// 表单变量KEY
	public static final String WFLOW_FORMS = "WFLOW_FORMS";

	// 系统审批管理员角色
	public static final String WFLOW_APPROVAL_ADMIN = "WFLOW_APPROVAL_ADMIN";

	// 默认系统作为审批用户
	public static final OrgUser SYS = OrgUser.builder()
		.id("WFLOW_SYS")
		.avatar("https://dd-static.jd.com/ddimg/jfs/t1/154957/17/25841/2492/631f2ca9Edc4615eb/9745007fe2540577.png")
		.name("系统")
		.type("user")
		.build();

	// 流程发起人变量
	public static final String INITIATOR = "initiator";

	// 模板变量替换正则编译
	public static final Pattern TEMPLATE_REPLACE_REG = Pattern.compile("\\$\\{(.+?)\\}");

}
